Skip to content

Feat: add gpt 5 models and verbosity param #4086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2025

Conversation

apappascs
Copy link
Contributor

Add gpt-5 models and update their tests

@apappascs
Copy link
Contributor Author

apappascs commented Aug 8, 2025

@apappascs apappascs changed the title Feat/gpt 5 models Feat: add gpt 5 models and verbosity param Aug 8, 2025
* <p>
* Note: GPT-5 models require temperature=1.0 (default value). Custom temperature
* values are not supported and will cause errors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not the case anymore? In that case, we need to update the docs changed in this commit: https://github.com/spring-projects/spring-ai/pull/4068/files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank youi for pointing out this one @sobychacko . it is the case for all gpt 5 models but not the gpt-5-chat model . https://community.openai.com/t/temperature-in-gpt-5-models/1337133/25
I have update documentation and added tests as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mean that the gpt 5 models default to a value of temperature 1.0? If so, I think we should make that clear in the docs or javadocs. From what I hear from you, the GPT 5 models completely ignore temperature and internally default to a value of 1.0. Is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is correct. Azure mentions also more params that are not supported, but I am am not sure if that info has to be on spring ai documentation as it is not a limitation of the framework but from the LLM model itself.

The following are currently unsupported with reasoning models:

temperature, top_p, presence_penalty, frequency_penalty, logprobs, top_logprobs, logit_bias, max_tokens

https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/reasoning?tabs=gpt-5%2Cpython-secure%2Cpy#not-supported

- update gpt-5 tests
- add verbosity parameter
- udpate documentation and add tests

Signed-off-by: Alexandros Pappas <[email protected]>
@sobychacko sobychacko added this to the 1.1.0.M1 milestone Aug 15, 2025
@sobychacko sobychacko merged commit fef454b into spring-projects:main Aug 15, 2025
2 checks passed
spring-builds pushed a commit that referenced this pull request Aug 15, 2025
- update gpt-5 tests
- add verbosity parameter
- udpate documentation and add tests

Fixes #4086

Signed-off-by: Alexandros Pappas <[email protected]>
(cherry picked from commit fef454b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants